﻿<Page
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:VMDS_GUIClient_ViewModels_Management_VMs="clr-namespace:VMDS.GUIClient.ViewModels.Management.VMs" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" x:Class="VMDS.GUIClient.Views.Management.VMs.AddVmStep3" 
      mc:Ignorable="d" 
      d:DesignHeight="416" d:DesignWidth="592"
	Title="AddVmStep3">
	<Page.Resources>
		<RadialGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" >
			<GradientStop Color="#FF1FC413" Offset="0.508"/>
			<GradientStop Color="#0A176C10" Offset="1"/>
		</RadialGradientBrush>
		<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="Padding" Value="2,0,0,0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBoxItem}">
						<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsSelected" Value="true">
								<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<DataTemplate x:Key="ScreenShotTemplate2">
			<DataTemplate.Resources>
				<Storyboard x:Key="OnMouseEnter1">
					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="grid">
						<EasingDoubleKeyFrame KeyTime="0" Value="160">
							<EasingDoubleKeyFrame.EasingFunction>
								<ElasticEase EasingMode="EaseIn" Oscillations="2"/>
							</EasingDoubleKeyFrame.EasingFunction>
						</EasingDoubleKeyFrame>
						<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="240">
							<EasingDoubleKeyFrame.EasingFunction>
								<BackEase EasingMode="EaseOut"/>
							</EasingDoubleKeyFrame.EasingFunction>
						</EasingDoubleKeyFrame>
					</DoubleAnimationUsingKeyFrames>
				</Storyboard>
				<Storyboard x:Key="OnMouseLeave1">
					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="grid">
						<EasingDoubleKeyFrame KeyTime="0" Value="240"/>
						<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="160"/>
					</DoubleAnimationUsingKeyFrames>
				</Storyboard>
			</DataTemplate.Resources>
			<Grid x:Name="grid" Margin="0" Height="120" d:DesignWidth="400" Width="Auto" RenderTransformOrigin="0.5,0.5">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="0.033*"/>
					<ColumnDefinition Width="0.925*"/>
					<ColumnDefinition Width="0.042*"/>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="0,9*"/>
					<RowDefinition Height="0,1*"/>
				</Grid.RowDefinitions>
				<Grid.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Grid.RenderTransform>
				<Image x:Name="image" Margin="0,16,0,8" Source="{Binding FileName}" RenderTransformOrigin="0.5,0.5" Grid.Column="1" Stretch="Uniform">
					<Image.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform/>
						</TransformGroup>
					</Image.RenderTransform>
				</Image>
			</Grid>
		</DataTemplate>
		<SolidColorBrush x:Key="StaticExtension2" Color="#FF31D22C"/>
	<!-- Button Styles -->
		<Style x:Key="Button" TargetType="{x:Type Button}">
			<Setter Property="Background">
				<Setter.Value>
					<RadialGradientBrush>
						<GradientStop Offset="0" Color="Black" />
						<GradientStop Offset="1" Color="Black" />
					</RadialGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Height" Value="40" />
			<Setter Property="Foreground" Value="white" />
			<Setter Property="Grid.Row" Value="2" />
			<Setter Property="Grid.Column" Value="3" />
			<Setter Property="Margin" Value="3" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<ControlTemplate.Resources>
							<Storyboard x:Key="Timeline1">
								<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
									<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.8"/>
									<SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
								</DoubleAnimationUsingKeyFrames>
							</Storyboard>
						</ControlTemplate.Resources>
						<Grid x:Name="grid" RenderTransformOrigin="0.5,0.5">
							<Grid.RowDefinitions>
								<RowDefinition Height="0.525*"/>
								<RowDefinition Height="0.475*"/>
							</Grid.RowDefinitions>
							<Grid.RenderTransform>
								<TransformGroup>
									<ScaleTransform ScaleX="1" ScaleY="1"/>
									<SkewTransform AngleX="0" AngleY="0"/>
									<RotateTransform Angle="0"/>
									<TranslateTransform X="0" Y="0"/>
								</TransformGroup>
							</Grid.RenderTransform>
							<Rectangle x:Name="GelBackground" Opacity="1" RadiusX="9" RadiusY="9" StrokeThickness="0.35" Grid.RowSpan="2" Fill="Black">
								<Rectangle.Stroke>
									<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
										<GradientStop Offset="0" Color="White" />
										<GradientStop Offset="1" Color="#666666" />
									</LinearGradientBrush>
								</Rectangle.Stroke>
							</Rectangle>
							<Rectangle x:Name="GelShine" Margin="2" VerticalAlignment="Stretch" RadiusX="6" RadiusY="6" Opacity="1" Stroke="Transparent" Height="Auto">
								<Rectangle.Fill>
									<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
										<GradientStop Offset="0" Color="#ccffffff" />
										<GradientStop Offset="1" Color="Transparent" />
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>

							<ContentPresenter x:Name="GelButtonContent" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}" Grid.RowSpan="2" />
						</Grid>

						<ControlTemplate.Triggers>

							<Trigger Property="IsMouseOver" Value="true">
								<Trigger.EnterActions>
									<BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
								</Trigger.EnterActions>
								<Setter TargetName="GelBackground" Property="Fill">
									<Setter.Value>
										<RadialGradientBrush>
											<GradientStop Offset="0.005" Color="#FF00DDFF" />
											<GradientStop Offset="1" Color="#FF1B0064" />
										</RadialGradientBrush>
									</Setter.Value>
								</Setter>
							</Trigger>
						
							<Trigger Property="IsDefault" Value="true">
								<Setter TargetName="GelBackground" Property="Fill">
									<Setter.Value>
										<RadialGradientBrush>
											<GradientStop Offset="0.005" Color="#FF00DDFF" />
											<GradientStop Offset="1" Color="#FF1B0064" />
										</RadialGradientBrush>
									</Setter.Value>
								</Setter>
							</Trigger>
						
						
						
							<Trigger Property="IsPressed" Value="true">
								<Setter Property="Fill" TargetName="GelBackground">
									<Setter.Value>
										<RadialGradientBrush>
											<GradientStop Offset="0" Color="#ffcc00" />
											<GradientStop Offset="1" Color="#cc9900" />
										</RadialGradientBrush>
									</Setter.Value>
								</Setter>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Style.Triggers>
				<Trigger Property="IsMouseOver" Value="true">
					<Setter Property="Foreground" Value="black " />
				</Trigger>
				<Trigger Property="IsPressed" Value="true">
					<Setter Property="Foreground" Value="black " />
				</Trigger>
				<Trigger Property="IsDefault" Value="False"/>
			</Style.Triggers>
		</Style>
	</Page.Resources>

	<Page.DataContext>
		<VMDS_GUIClient_ViewModels_Management_VMs:AddVmViewModel/>
	</Page.DataContext>

    <Grid>
    	<Rectangle Margin="5" Stroke="#FFF8F3F3" StrokeThickness="0.5" RadiusX="10" RadiusY="10">
    		<Rectangle.Fill>
    			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" Opacity="0.435">
    				<LinearGradientBrush.RelativeTransform>
    					<TransformGroup>
    						<ScaleTransform CenterY="0.5" CenterX="0.5"/>
    						<SkewTransform CenterY="0.5" CenterX="0.5"/>
    						<RotateTransform CenterY="0.5" CenterX="0.5"/>
    						<TranslateTransform/>
    					</TransformGroup>
    				</LinearGradientBrush.RelativeTransform>
    				<GradientStop Color="#FFEFECEC"/>
    				<GradientStop Offset="0.558"/>
    				<GradientStop Color="#FFEFECEC" Offset="1"/>
    				<GradientStop Offset="0.494"/>
    			</LinearGradientBrush>
    		</Rectangle.Fill>
    	</Rectangle>
    	<ListBox  ItemTemplate="{DynamicResource ScreenShotTemplate2}" Height="151" VerticalAlignment="Top" ItemsSource="{Binding Instance.ScreenShots}" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" Background="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" HorizontalAlignment="Left" Width="150" Margin="229,170,0,0" SelectedItem="{Binding Instance.CurrentScreen}">
    		<ListBox.BorderBrush>
    			<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
    		</ListBox.BorderBrush>
    	</ListBox>
    	<Button Grid.Column="0" HorizontalAlignment="Left" Margin="40,0,0,20" Grid.Row="0" Style="{DynamicResource Button}" VerticalAlignment="Bottom" Width="103" Command="{Binding Instance.GoToStep2, Mode=OneWay}" d:LayoutOverrides="Height">
    		<StackPanel Orientation="Horizontal">
    			<ed:BlockArrow Height="24" Margin="0" Orientation="Left" Stroke="#FFF8F3F3" StrokeThickness="0.5" Width="32" VerticalAlignment="Center">
    				<ed:BlockArrow.Fill>
    					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    						<GradientStop Color="#FF09991F" Offset="0.51"/>
    						<GradientStop Offset="1"/>
    						<GradientStop/>
    					</LinearGradientBrush>
    				</ed:BlockArrow.Fill>
    			</ed:BlockArrow>
    			<TextBlock Height="24" Margin="7,0,0,0" TextWrapping="Wrap" Text="Назад" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18.667"/>
    		</StackPanel>
    	</Button>
    	<TextBlock Margin="100,40,0,0" TextWrapping="Wrap" Text="Название" Height="32" VerticalAlignment="Top" FontSize="18.667" HorizontalAlignment="Left" Width="88"/>
    	<TextBlock Margin="229,40,0,0" TextWrapping="Wrap" Text="{Binding Instance.VmName}" Height="32" VerticalAlignment="Top" FontSize="18.667" HorizontalAlignment="Left" FontStyle="Italic"/>
    	<TextBlock Margin="100,76,0,0" TextWrapping="Wrap" Text="Описание" Height="32" VerticalAlignment="Top" FontSize="18.667" HorizontalAlignment="Left" Width="88"/>
    	<TextBlock Margin="229,76,45,0" TextWrapping="Wrap" Text="{Binding Instance.Description}" Height="79" VerticalAlignment="Top" FontSize="18.667"/>
    	<TextBlock Margin="100,179,0,205" TextWrapping="Wrap" Text="Скриншоты" FontSize="18.667" HorizontalAlignment="Left" Width="105"/>
    	<Button Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,62,20" Grid.Row="0" Style="{DynamicResource Button}" VerticalAlignment="Bottom" Width="186" Command="{Binding Instance.GoToStep4, Mode=OneWay}" d:LayoutOverrides="Height">
    		<StackPanel Orientation="Horizontal">
    			<TextBlock Height="24" Margin="7,0,0,0" TextWrapping="Wrap" Text="Начать установку" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18.667"/>
    		</StackPanel>
    	</Button>
    </Grid>
</Page>
